const express = require("express");
const router = express.Router();
const path = require("path");

const MenuService = require(path.join(process.cwd(), "/services/MenuService"));

router.get("/", (req, res, next) => {
  MenuService.getMenus(req.userInfo, function (err, result) {
    if (err) return res.sendResult(500, null, err);
    res.sendResult(200, result, "获取菜单列表成功");
  });
});

module.exports = router;
